package com.TTBook.core.image.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BookImgRelCriteria {
    protected String orderByClause;

    protected List oredCriteria;

    public BookImgRelCriteria() {
        oredCriteria = new ArrayList();
    }

    protected BookImgRelCriteria(BookImgRelCriteria example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public List getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table ts_book_img_rel
     *
     *  Wed Oct 16 00:26:52 CST 2013
     */
    public void clear() {
        oredCriteria.clear();
    }

    public static class Criteria {
        protected List criteriaWithoutValue;

        protected List criteriaWithSingleValue;

        protected List criteriaWithListValue;

        protected List criteriaWithBetweenValue;

        protected Criteria() {
            super();
            criteriaWithoutValue = new ArrayList();
            criteriaWithSingleValue = new ArrayList();
            criteriaWithListValue = new ArrayList();
            criteriaWithBetweenValue = new ArrayList();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List list = new ArrayList();
            list.add(value1);
            list.add(value2);
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andImgIdIsNull() {
            addCriterion("IMG_ID is null");
            return this;
        }

        public Criteria andImgIdIsNotNull() {
            addCriterion("IMG_ID is not null");
            return this;
        }

        public Criteria andImgIdEqualTo(String value) {
            addCriterion("IMG_ID =", value, "imgId");
            return this;
        }

        public Criteria andImgIdNotEqualTo(String value) {
            addCriterion("IMG_ID <>", value, "imgId");
            return this;
        }

        public Criteria andImgIdGreaterThan(String value) {
            addCriterion("IMG_ID >", value, "imgId");
            return this;
        }

        public Criteria andImgIdGreaterThanOrEqualTo(String value) {
            addCriterion("IMG_ID >=", value, "imgId");
            return this;
        }

        public Criteria andImgIdLessThan(String value) {
            addCriterion("IMG_ID <", value, "imgId");
            return this;
        }

        public Criteria andImgIdLessThanOrEqualTo(String value) {
            addCriterion("IMG_ID <=", value, "imgId");
            return this;
        }

        public Criteria andImgIdLike(String value) {
            addCriterion("IMG_ID like", value, "imgId");
            return this;
        }

        public Criteria andImgIdNotLike(String value) {
            addCriterion("IMG_ID not like", value, "imgId");
            return this;
        }

        public Criteria andImgIdIn(List values) {
            addCriterion("IMG_ID in", values, "imgId");
            return this;
        }

        public Criteria andImgIdNotIn(List values) {
            addCriterion("IMG_ID not in", values, "imgId");
            return this;
        }

        public Criteria andImgIdBetween(String value1, String value2) {
            addCriterion("IMG_ID between", value1, value2, "imgId");
            return this;
        }

        public Criteria andImgIdNotBetween(String value1, String value2) {
            addCriterion("IMG_ID not between", value1, value2, "imgId");
            return this;
        }

        public Criteria andBookidIsNull() {
            addCriterion("BOOKID is null");
            return this;
        }

        public Criteria andBookidIsNotNull() {
            addCriterion("BOOKID is not null");
            return this;
        }

        public Criteria andBookidEqualTo(String value) {
            addCriterion("BOOKID =", value, "bookid");
            return this;
        }

        public Criteria andBookidNotEqualTo(String value) {
            addCriterion("BOOKID <>", value, "bookid");
            return this;
        }

        public Criteria andBookidGreaterThan(String value) {
            addCriterion("BOOKID >", value, "bookid");
            return this;
        }

        public Criteria andBookidGreaterThanOrEqualTo(String value) {
            addCriterion("BOOKID >=", value, "bookid");
            return this;
        }

        public Criteria andBookidLessThan(String value) {
            addCriterion("BOOKID <", value, "bookid");
            return this;
        }

        public Criteria andBookidLessThanOrEqualTo(String value) {
            addCriterion("BOOKID <=", value, "bookid");
            return this;
        }

        public Criteria andBookidLike(String value) {
            addCriterion("BOOKID like", value, "bookid");
            return this;
        }

        public Criteria andBookidNotLike(String value) {
            addCriterion("BOOKID not like", value, "bookid");
            return this;
        }

        public Criteria andBookidIn(List values) {
            addCriterion("BOOKID in", values, "bookid");
            return this;
        }

        public Criteria andBookidNotIn(List values) {
            addCriterion("BOOKID not in", values, "bookid");
            return this;
        }

        public Criteria andBookidBetween(String value1, String value2) {
            addCriterion("BOOKID between", value1, value2, "bookid");
            return this;
        }

        public Criteria andBookidNotBetween(String value1, String value2) {
            addCriterion("BOOKID not between", value1, value2, "bookid");
            return this;
        }

        public Criteria andImgLocationSerNumIsNull() {
            addCriterion("IMG_LOCATION_SER_NUM is null");
            return this;
        }

        public Criteria andImgLocationSerNumIsNotNull() {
            addCriterion("IMG_LOCATION_SER_NUM is not null");
            return this;
        }

        public Criteria andImgLocationSerNumEqualTo(String value) {
            addCriterion("IMG_LOCATION_SER_NUM =", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumNotEqualTo(String value) {
            addCriterion("IMG_LOCATION_SER_NUM <>", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumGreaterThan(String value) {
            addCriterion("IMG_LOCATION_SER_NUM >", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumGreaterThanOrEqualTo(String value) {
            addCriterion("IMG_LOCATION_SER_NUM >=", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumLessThan(String value) {
            addCriterion("IMG_LOCATION_SER_NUM <", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumLessThanOrEqualTo(String value) {
            addCriterion("IMG_LOCATION_SER_NUM <=", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumLike(String value) {
            addCriterion("IMG_LOCATION_SER_NUM like", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumNotLike(String value) {
            addCriterion("IMG_LOCATION_SER_NUM not like", value, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumIn(List values) {
            addCriterion("IMG_LOCATION_SER_NUM in", values, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumNotIn(List values) {
            addCriterion("IMG_LOCATION_SER_NUM not in", values, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumBetween(String value1, String value2) {
            addCriterion("IMG_LOCATION_SER_NUM between", value1, value2, "imgLocationSerNum");
            return this;
        }

        public Criteria andImgLocationSerNumNotBetween(String value1, String value2) {
            addCriterion("IMG_LOCATION_SER_NUM not between", value1, value2, "imgLocationSerNum");
            return this;
        }
    }
}